<#-- 导入模版定义文件-->
<#include "../template/template_editPage.ftl">
<@edit title="订单编辑">

<body class="input">

<script type="text/javascript">
    $().ready(function () {

        var $validateErrorContainer = $("#validateErrorContainer");
        var $validateErrorLabelContainer = $("#validateErrorContainer ul");
        var $validateForm = $("#inputForm");
        var $tab = $("#tab");

        // Tab效果
        $tab.tabs(".tabContent", {
            tabs:"input"
        });

        submitHandler: function (form) {
            $(form).find(":submit").attr("disabled", true);
            form.submit();
        }
        <#if actionErrors?? && (actionErrors?size > 0)>
            $.messager.show("提示信息", "<#list errorMessages as list>${list}<br></#list>", 2000);
        </#if>
    });
</script>

<div class="body">
    <div class="inputBar">
        <h1><span class="icon">&nbsp;</span>订单修改</h1>
    </div>
    <div style="display: none;" id="validateErrorContainer" class="validateErrorContainer">
        <div class="validateErrorTitle">以下信息填写有误,请重新填写</div>
        <ul></ul>
    </div>
    <form id="inputForm" class="validate" action="${web_base}/game/order_info!edit.htm" method="post">
        <input type="hidden" name="ordId" value="${ordId!}" />
        <input type="hidden" name="status" value="${status!}" />
        <input type="hidden" name="merchantOrderId" value="${merchantOrderId!}" />
        <input type="hidden" name="gameAccount2" value="${gameAccount2!}" />
        <ul class="tab">
            <li>
                <input type="button" value="基本信息" hidefocus="true"/>
            </li>
        </ul>
        <table class="inputTable tabContent">
            <tr>
                <th>
                    订单编号:
                </th>
                <td>
                ${(orderInfo.orderId)!}
                    <input type="hidden" name="orderInfo.orderId" class="formText {required: true}"
                           value="${(orderInfo.orderId)!}"/>
                </td>
            </tr>
            <tr>
                <th>
                    商品名称:
                </th>
                <td>
                ${(orderInfo.goodsName)!}
                    <input type="hidden" name="goodsName" class="formText {required: true}"
                           value="${(orderInfo.goodsName)!}"/>
                </td>
            </tr>
            <tr>
                <th>
                    玩家游戏账号:
                </th>
                <td>
                ${(orderInfo.gameAccount)!}
                    <input type="hidden" name="gameAccount" class="formText {required: true}"
                           value="${(orderInfo.gameAccount)!}"/>
                </td>
            </tr>
            <tr>
                <th>
                    商品面值(元):
                </th>
                <td>
                ${(orderInfo.goodsValue*1.0/1000)?string("0.000")!}
                    <input type="hidden" name="goodsValue" class="formText {required: true}"
                           value="${(orderInfo.goodsValue)!}"/>
                </td>
            </tr>
            <tr>
                <th>
                    商品售价(元):
                </th>
                <td>
                ${(orderInfo.goodsSalePrice*1.0/1000)?string("0.000")!}
                    <input type="hidden" name="goodsSalePrice" class="formText {required: true}"
                           value="${(orderInfo.goodsSalePrice)!}"/>
                </td>
            </tr>
            <tr>
                <th>
                    数量:
                </th>
                <td>
                ${(orderInfo.buyNum)!}
                    <input type="hidden" name="buyNum" class="formText {required: true}"
                           value="${(orderInfo.buyNum)!}"/>
                </td>
            </tr>
            <tr>
                <th>
                    总金额(元):
                </th>
                <td>
                ${(orderInfo.totalPrice*1.0/1000)?string("0.000")!}
                    <input type="hidden" name="totalPrice" class="formText {required: true}"
                           value="${(orderInfo.totalPrice)!}"/>
                </td>
            </tr>
            <tr>
                <th>
                    订单状态:
                </th>
                <td>
                    <#if  orderInfo.status?? &&  orderInfo.status=="0">
                        <select name="orderInfo.status" disabled="disabled">
                            <option value="0"  <#if orderInfo.status=="0">selected="selected"</#if>>失败</option>
                             <option value="1"  <#if orderInfo.status=="1">selected="selected"</#if>>成功</option>
                            <option value="2"  <#if orderInfo.status=="2">selected="selected"</#if>>处理中</option>
                            <option value="3"  <#if orderInfo.status=="3">selected="selected"</#if>>存疑</option>
                        </select>
                        <input type="hidden" name="orderInfo.status" class="formText {required: true}"
                               value="${(orderInfo.status)!}"/>
                    <#elseif  orderInfo.status?? &&  orderInfo.status=="1">
                        <select name="orderInfo.status" disabled="disabled">
                            <option value="1"  <#if orderInfo.status=="1">selected="selected"</#if>>成功</option>
                            <option value="0"  <#if orderInfo.status=="0">selected="selected"</#if>>失败</option>
                            <option value="2"  <#if orderInfo.status=="2">selected="selected"</#if>>处理中</option>
                            <option value="3"  <#if orderInfo.status=="3">selected="selected"</#if>>存疑</option>
                        </select>
                        <input type="hidden" name="orderInfo.status" class="formText {required: true}"
                               value="${(orderInfo.status)!}"/>
                    <#else >
                        <select name="orderInfo.status">
                            <option value="">-请选择-</option>
                            <option value="0"  <#if orderInfo.status=="0">selected="selected"</#if>>失败</option>
                            <option value="1"  <#if orderInfo.status=="1">selected="selected"</#if>>成功</option>
                            <option value="2"  <#if orderInfo.status=="2">selected="selected"</#if>>处理中</option>
                            <option value="3"  <#if orderInfo.status=="3">selected="selected"</#if>>存疑</option>
                        </select>
                    </#if>
                </td>
            </tr>
            <tr>
                <th>
                    上游订单编号:
                </th>
                <td>
                ${(orderInfo.supOrderId)!}
                    <input type="text" name="orderInfo.supOrderId" class="formText {required: true}"
                           value="${(orderInfo.supOrderId)!}"/>
                </td>
            </tr>
            <tr>
                <th>
                    订单状态备注:
                </th>
                <td><textarea name="orderInfo.statusRemark"
                              style="width: 200px;height: 60px;">${(orderInfo.statusRemark)!}</textarea>
                </td>
            </tr>
            <tr>
                <th>
                    支付状态:
                </th>
                <td>
                    <#if orderInfo.isPay?? && orderInfo.isPay=="0">
                        支付失败
                    <#elseif orderInfo.isPay?? && orderInfo.isPay=="1">
                        支付成功
                    <#elseif orderInfo.isPay?? && orderInfo.isPay=="2">
                        退款失败
                    <#elseif orderInfo.isPay?? && orderInfo.isPay=="3">
                        退款成功
                    </#if>
                    <input type="hidden" name="isPay" class="formText {required: true}" value="${(orderInfo.isPay)!}"/>
                </td>
            </tr>
            <tr>
                <th>
                    支付时间:
                </th>
                <td>
                ${(orderInfo.payTime)!}
                    <input type="hidden" name="payTime" class="formText {required: true}"
                           value="${(orderInfo.payTime)!}"/>
                </td>
            </tr>
            <tr>
                <th>
                    订单生成时间:
                </th>
                <td>
                ${(orderInfo.createOrderTime)!}
                    <input type="hidden" name="createOrderTime" class="formText {required: true}"
                           value="${(orderInfo.createOrderTime)!}"/>
                </td>
            </tr>
            <tr>
                <th>
                    备注:
                </th>
                <td><textarea name="orderInfo.remark"
                              style="width: 200px;height: 60px;">${(orderInfo.remark)!}</textarea>
                </td>
            </tr>

        </table>
        <div class="buttonArea">
            <input type="submit" class="formButton" value="更  新" hidefocus="true"/>&nbsp;&nbsp;&nbsp;&nbsp;
            <input type="button" class="formButton" onclick="window.history.back(); return false;" value="返  回"
                   hidefocus="true"/>
        </div>
    </form>
</div>
</body>
</@edit>
